import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const routes = [
  { path: "/", redirect: "/layout" },
  {
    path: "/layout",
    component: () => import("../layout/index.vue"),
    children: [
      {
        path: "redirect/:path(.*)",
        component: () => import("@/views/redirect.vue"),
      },

      {
        path: "home",
        component: () => import("@/views/home.vue"),
      },
      {
        path: "bigScreen",
        component: () => import("@/views/bigScreen.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  routes, // (缩写) 相当于 routes: routes
});
export default router;
